#ifndef PAR_H
#define PAR_H

#include "stm32f10x.h"
#include "driver.h"

// par table
#define dbs_par_pk_crc                                  0
#define dbs_par_pk_isinit                               1
#define dbs_par_pk_data1                                2       
#define dbs_par_pk_data2                                3     
#define dbs_par_pk_data3                                4       
#define dbs_par_pk_data4                                5
#define dbs_par_pk_data5                                6

#define dbs_par_pk_number                               7

extern uint32_t Dbs_initParTable(void);
extern uint32_t Dbs_setParDefault(void);
//extern uint32_t Dbs_setOTAParDefault();
extern uint32_t Dbs_setParValue(uint32_t pk, uint8_t *data, uint32_t length);
extern uint32_t Dbs_getParValue(uint32_t pk, uint8_t *data, uint32_t *length);
extern uint32_t Dbs_getParLength(uint32_t pk, uint32_t *length);


#endif

